/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80031 (8.0.31)
 Source Host           : localhost:3306
 Source Schema         : base_single

 Target Server Type    : MySQL
 Target Server Version : 80031 (8.0.31)
 File Encoding         : 65001

 Date: 24/03/2025 10:20:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `title` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '模块标题',
  `method` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '请求方式',
  `operator_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '操作类别（0 其它 1 后台用户 2 移动端用户）',
  `username` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '操作人员',
  `url` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '请求URL',
  `ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '主机地址',
  `location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '操作地点',
  `param` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '请求参数',
  `json_result` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '返回参数',
  `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '0' COMMENT '操作状态（0正常 1异常）',
  `error_msg` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '错误消息',
  `execution_time` bigint DEFAULT NULL COMMENT '执行时间(ms)',
  `browser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '浏览器',
  `browser_version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '浏览器版本',
  `os` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '终端系统',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `valid` int DEFAULT '1' COMMENT '有效状态，0:无效 1:有效',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统日志表';

-- ----------------------------
-- Records of sys_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` varchar(32) NOT NULL COMMENT '用户ID',
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '密码',
  `dept_id` bigint DEFAULT NULL COMMENT '所属部门',
  `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '所属部门名称',
  `post_ids` json DEFAULT NULL COMMENT '岗位组',
  `icon` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '头像',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '手机号',
  `nick_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '昵称',
  `sex` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '性别，0:男 1:女 2:未知',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注信息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '1' COMMENT '启用状态，0:禁用 1:启用',
  `login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
  `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后登陆IP',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人',
  `valid` int DEFAULT '1' COMMENT '有效状态，0:无效 1:有效',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='用户表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1', 'admin', '123', 1, '', '[]', '', '183865800@qq.com', '16666666666', 'admin', '1', NULL, '1', '2024-11-20 17:25:53', '192.168.31.7', '2019-09-29 13:55:30', NULL, '2025-03-21 09:38:36', 'admin', 1);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1897920794214805506', '张三', '123', 0, '', '1', '', '183865800@qq.com', '', '张三', '1', '', '', NULL, '', '2025-03-07 16:02:34', '', '2025-03-21 09:38:36', '', 0);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1897920969649958913', '李四', '123', 0, '', '1', '', '183865800@qq.com', '', '李四', '1', '', '', NULL, '', '2025-03-07 16:03:15', '', '2025-03-21 09:38:36', '', 0);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1897921175498010626', '王五', '123', 0, '', '1', '', '183865800@qq.com', '', '王五', '1', '', '', NULL, '', '2025-03-07 16:04:07', '', '2025-03-21 09:38:36', '', 0);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1897921390074408962', '宋江', '123', 0, '', '1', '', '183865800@qq.com', '', '宋江', '1', '', '', NULL, '', '2025-03-07 16:04:56', '', '2025-03-21 09:38:36', '', 0);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1897947688301879298', '王宜仁', '123', 0, '', '1', '', '183865800@qq.com', '', '王宜仁', '1', '', '', NULL, '', '2025-03-07 17:49:26', '', '2025-03-21 09:38:31', '', 0);
INSERT INTO `sys_user` (`id`, `username`, `password`, `dept_id`, `dept_name`, `post_ids`, `icon`, `email`, `phone`, `nick_name`, `sex`, `note`, `status`, `login_time`, `login_ip`, `create_time`, `create_by`, `update_time`, `update_by`, `valid`) VALUES ('1902901094904758274', '1223', '', 0, '', '1', '', '', '', '王宜仁', '1', '', '', NULL, '', '2025-03-21 09:52:30', '', '2025-03-21 09:52:30', '', 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
